﻿using System;
using System.Collections;
using System.Linq;
using System.Collections.Generic;

namespace RedisDemos.Extensions
{
    public static class EnumerableExtensions
    {
        public static void ForEach<T>(this IEnumerable<T> list, Action<T> action)
        {
            foreach (var actual in list)
                action(actual);
        }

        public static void For<T>(this T[] actual, Action<Int32, T> action)
        {
            for (var i = 0; i < actual.Length; i++)
                action(i, actual[i]);
        }
    }
}
